<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <!--<script src="src/js/jquery-1.8.2.min.js"></script>-->
<link href="app.css?3c8ce57f3a2af45d7ebf" rel="stylesheet"><script type="text/javascript" src="app.index_bundle.js?3c8ce57f3a2af45d7ebf"></script></head>
<body>
    <div id="root"></div>
</body>
<script>
    //'http://192.168.5.112:5555/api-a/'
    //var app=new app('192.168.1.33:8081');
    var app=new app('/');
    var data=[{
        title:'测试菜单',
        icon:'icon-repairfill',
        func:function (e) {
            var template=$('<div/>',{
                html:'<div class="radio-wrap">'
                +'<div class="item"><input name="radix" type="radio" class="custom-ipt"> <span>2进制</span></div>'
                +'<div class="item"><input name="radix" type="radio" class="custom-ipt"> <span>8进制</span></div>'
                +'<div class="item"><input name="radix" type="radio" class="custom-ipt"> <span>10进制</span></div>'
                +'<div class="item"><input name="radix" type="radio" class="custom-ipt"> <span>16进制</span></div>'
                +'</div>'
                +'<div class="input-wrap"><input type="text"></div>',
                class:'radixradio'
            })

            var d= app.dialog({
                skin: 'dialog-custom',
                title:'测试',
                content:template,
                okValue:'测试按钮',
                ok:function () {

                }
            })
            d.show()
        }
    },{
        title:'测试菜单',
        icon:'icon-questionfill',
        func:function (e) {

        }
    },{
        title:'测试菜单',
        icon:'icon-exit',
        func:function (e) {
            alert('hello')
        }
    }]
        app.page.login();
        //创建功能菜单
        //app.creatTopRightBtns(data);


        // setTimeout(function(){
        //     var el=app.addTab('test',1234,'http://www.baidu.com/{origin}')
        //     el.click()
        // },2000)


        $(window).on('openMenu',function (e,id,name) {
            return
            console.log(id,name)
        })

        $(window).on('closeMenu',function (e,id,name) {
            console.log(id,name)
        })

    //解决跨域问题
    // window.addEventListener('message',function(e){
    //     if(e){
    //         var data=e.data;
    //         app.addTab(data.name,data.id,data.url)
    //     }
    // })

//    window.onload=function(){
//        window.frames[0].postMessage('getcolor','*');
//    }


</script>
</html>